/* 全局样式 */
:root {
    --primary-color: #B3927F;
    --primary-hover: #9A7B69;
    --background-color: #F5F5F5;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 产品卡片悬停效果 */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 按钮悬停效果 */
.btn-hover {
    transition: all 0.3s ease;
}

.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(179, 146, 127, 0.3);
}

/* 模态框动画 */
.modal-enter {
    animation: modalEnter 0.3s ease-out;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 导航栏下拉菜单 */
.dropdown {
    transition: all 0.2s ease;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* 表单样式 */
.form-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(179, 146, 127, 0.2);
}

/* 购物车徽标动画 */
.cart-badge {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* 响应式布局辅助类 */
@media (max-width: 640px) {
    .mobile-menu {
        display: block;
    }
    
    .desktop-menu {
        display: none;
    }
}

/* 加载动画 */
.loading {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 图片悬停效果 */
.image-hover {
    transition: transform 0.3s ease;
}

.image-hover:hover {
    transform: scale(1.05);
}

/* 页脚链接悬停效果 */
.footer-link {
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--primary-color);
}

/* 页面淡入效果 */
body {
    animation: pageLoad 0.6s ease-in;
}

@keyframes pageLoad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 导航链接悬停效果 */
.nav-link {
    position: relative;
    transition: color 0.3s;
}

.nav-link:after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #B3927F;
    transition: width 0.3s;
}

.nav-link:hover:after {
    width: 100%;
}

/* 产品卡片动画效果 */
.product-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(179, 146, 127, 0.1);
}

.product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(179, 146, 127, 0.2);
}

.product-card img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover img {
    transform: scale(1.08);
}

/* 购物车悬浮按钮动画 */
.cart-float {
    animation: floatIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 按钮点击波纹效果 */
.ripple-button {
    position: relative;
    overflow: hidden;
}

.ripple-button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform .5s, opacity 1s;
}

.ripple-button:active::after {
    transform: scale(0, 0);
    opacity: .3;
    transition: 0s;
}

/* 滚动渐入效果 */
.scroll-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 图片悬停放大效果 */
.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-zoom:hover img {
    transform: scale(1.1);
}

/* 文字渐变动画 */
.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), #9A7B69);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 8s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.animate-fade-in {
    opacity: 1;
    transform: translateY(0);
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(253, 248, 245, 0.9);
    border-bottom: 1px solid #eee;
    height: 80px;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.animate-image {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.animate-image.img-loaded {
    opacity: 1;
}

@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.cart-bounce {
    animation: cartBounce 1s ease;
}

/* 结算按钮样式 */
.checkout-btn {
    background: linear-gradient(135deg, #B3927F 0%, #9A7B69 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(179, 146, 127, 0.4);
}

.checkout-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* 轮播图样式 */
.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #FDF8F5;
}

.carousel-slide {
    height: 100%;
    display: flex;
    align-items: center;
}

/* 轮播图文字区域样式调整 */
.carousel-slide .w-1/2 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.carousel-slide h2 {
    font-size: 36px;
    color: #333;
    font-weight: normal;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-align: center;
}

.carousel-slide p {
    font-size: 24px;
    color: #666;
    letter-spacing: 1px;
    text-align: center;
}

/* 轮播图图片区域调整 */
.carousel-slide .w-1/2.flex.justify-end {
    padding-left: 5%;
}

/* 轮播指示器样式 */
.carousel-container .bottom-8 button {
    width: 32px;
    height: 4px;
    border-radius: 0;
    background-color: #B3927F;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.carousel-container .bottom-8 button:hover,
.carousel-container .bottom-8 button.active {
    opacity: 1;
}

/* 背景装饰动画 */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.absolute.rounded-full {
    animation: float 6s ease-in-out infinite;
}

/* 导航栏样式调整 */
nav {
    background-color: #FDF8F5 !important;
    border-bottom: 1px solid #eee;
    height: 80px;
}

nav .max-w-7xl {
    height: 80px;
}

nav .flex.justify-between {
    height: 100%;
}

/* Logo样式 */
nav img {
    transition: transform 0.3s ease;
}

nav img:hover {
    transform: scale(1.05);
}

/* 导航链接样式 */
nav a {
    font-size: 14px;
    color: #666;
    padding: 0 5px;
    position: relative;
}

nav a:hover {
    color: #B3927F;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #B3927F;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* 图标样式 */
nav .fas {
    font-size: 16px;
    color: #666;
    transition: color 0.3s ease;
}

nav .fas:hover {
    color: #B3927F;
}

/* 购物车徽标样式 */
nav .relative span {
    transition: transform 0.3s ease;
}

nav .relative:hover span {
    transform: scale(1.1);
}

/* 确保内容不被导航栏遮挡 */
body {
    padding-top: 80px;
}
  